home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / alog10.rea < prev    next >
Text File  |  1996-01-16  |  5KB  |  174 lines

  1. Short:    Different logfile entries in ONE window
  2. Author:   atte@crash.north.de (Andreas Gelhausen)
  3. Uploader: cosinus@deepthought.north.de (Christian Stelter)
  4. Type:     util/misc
  5.  
  6. System requirements:   Kickstart 2.04+
  7.  
  8.  
  9. Usage
  10. =====
  11.  
  12.    Do you have many tools installed and each of them prints in an own
  13. logfile (or in a logwindow)? Do you want all these entries displayed
  14. in only one logwindow? Then you should try alog with all its options.
  15.  =¦^)
  16.  
  17.    alog is a small program that allows you to get the new entries from
  18. a certain logfile and prints it wherever you want (similar to 'tail'
  19. under UNIX).
  20.  
  21.  
  22. You can select the following options:
  23.  
  24.    TOOLPRI/K/N:
  25.  
  26.       You can set the task priority of alog from -128 to 127.
  27.  
  28.       Example:
  29.                1> alog toolpri=1 <other_parameters>
  30.  
  31.    FROM/K/A:
  32.  
  33.       Here you have to specify the logfile, where alog gets the new
  34.       entries from.
  35.  
  36.    TO/K:
  37.  
  38.       This option allows you to specify an output file for alog that
  39.       will be opened and closed for each line alog writes into it.
  40.  
  41.    PERMANENT/S:
  42.  
  43.       If one of your tools runs in the background ('AmiTCP' for
  44.       example) and its logfile won't be closed during its usage
  45.       or the used filesystem doesn't support notify messages, alog
  46.       won't get notify messages when new entries will be written
  47.       to the specified logfile.
  48.       For those tools/filesytems you can select the option PERMANENT
  49.       and alog will check if new entries have arrived from time to time.
  50.       (See also option INTERVAL.)
  51.  
  52.       Example:
  53.                1> alog from t:AmiTCP.log permanent addedonly
  54.  
  55.                will print each new entry of t:AmiTCP.log to shell. 
  56.                (See also option ADDEDONLY.)
  57.  
  58.    INTERVAL/K/N:
  59.  
  60.       If you have selected the option PERMANENT, you can set the
  61.       time between the tests for new entries.
  62.  
  63.       Example:
  64.                1> alog from t:AmiTCP.log permanent addedonly interval 10
  65.  
  66.                will print the new entries of t:AmiTCP.log each 10
  67.                seconds to shell.
  68.                (See also option ADDEDONLY.)
  69.  
  70.    ADDEDONLY/S:
  71.  
  72.       If you select this option, only the new entries which will be
  73.       added to a given logfile will be printed. 
  74.  
  75.    HEADER/K:
  76.  
  77.       This option allows you to set an own header for the messages.
  78.  
  79.       Example:
  80.                1> run alog from t:test header "TEST-HEADER: "
  81.                [CLI 11]
  82.                1> echo "blafasel" >t:test
  83.  
  84.                and you will get the message "TEST-HEADER: blafasel".
  85.  
  86.    STRIPLEFT/K/N:
  87.  
  88.       Some tools have their own headers. You can strip those headers
  89.       by setting STRIPLEFT to their length.
  90.  
  91.       Example:
  92.                1> run alog from t:test stripleft 30
  93.                [CLI 11]
  94.                1> echo "HEADER-YOU-DON'T-WANT-TO-SEE: blafasel" >t:test
  95.  
  96.                and you will receive the message "blafasel".
  97.  
  98.    MAXLINELEN/K/N:
  99.  
  100.       This option allows you to handle very long messages. It's useful
  101.       by using small logwindows.
  102.  
  103.       Example:
  104.                1> run alog from t:test maxlinelen 12
  105.                [CLI 11]
  106.                1> echo "FIRST LINE  SECOND LINE THIRD LINE"
  107.  
  108.                and you will receive the message "FIRST LINE
  109.                                                  SECOND LINE
  110.                                                  THIRD LINE".
  111.  
  112. Now I hope you know how you have to use all of alog's options and I
  113. will try to explain, what you have to do to get the logfile entries
  114. of all your tools into ONE logwindow.
  115.  
  116. If you want to display the log messages of x tools, you have to start
  117. alog at x+1 times.
  118.  
  119.  
  120. How to install alog
  121. ===================
  122.  
  123. 1. Add the following line to your s:user-startup...
  124.  
  125.    run alog from t:alog.out >CON:0/0/640/100/message_window/WAIT/CLOSE
  126.  
  127.    This is the main process of alog. Everything that is printed to
  128.    t:alog.out will be printed to your message window.
  129.  
  130.    Try:
  131.        1> echo "WARNING: alog found in your system! =¦^)" >t:alog.out
  132.  
  133.    or:
  134.        1> date >t:alog.out
  135.  
  136. 2. If you want to see the new entries of a certain logfile <logfile>
  137.    in your message window, you only have to start alog with following
  138.    parameters:
  139.  
  140.    1> run alog from <logfile> to t:alog.out addedonly
  141.  
  142.    Don't forget: For some tools (like AmiTCP) you have to use the option
  143.    PERMANENT.
  144.  
  145. That's it.  =¦^)
  146.  
  147.  
  148. Example installation
  149. ====================
  150.  
  151. Now you will see some examples for certain tools.
  152. The command line...
  153.  
  154.   run >nil: dh0:utilities/alog from t:alog.out
  155.    >"CON:210/885/814/139/alog on crash.north.de/INACTIVE/WAIT/CLOSE"
  156.  
  157. prints all entries from t:alog.out to the specified message window.
  158. The next command lines are examples for AmiTCP...
  159.  
  160.   run >nil: dh0:utilities/alog from t:AmiTCP.log to t:alog.out addedonly
  161.    permanent interval 5 stripleft 34 header "*E[32m[ AmiTCP ]*E[0m "
  162.  
  163. for UMS...
  164.  
  165.   run >nil: dh0:utilities/alog from Basket:logfiles/ums.log to t:alog.out
  166.    addedonly permanent stripleft 20 header "*E[32m[  UMS   ]*E[0m "
  167.  
  168. and for Cron...
  169.  
  170.   run >nil: dh0:utilities/alog from t:CronLog to t:alog.out addedonly
  171.    header "*E[32m[  Cron  ]*E[0m "
  172.  
  173. which all prints to 't:alog.out'.
  174.